import request from '@/utils/request.js'

export function getByDate (time) {
  return request({
    url: '^/basicinfo/getByDate?time=' + time,
    method: 'get'
  })
}
export function deleteByDate (date) {
  return request({
    url: '^/basicinfo/deleteByDate?date=' + date,
    method: 'get'
  })
}
export function saveInfo (data) {
  return request({
    url: '^/basicinfo/saveInfo',
    method: 'post',
    data
  })
}
export function listInfo () {
  return request({
    url: '^/basicinfo/list',
    method: 'get'
  })
}
export function editInfo (data) {
  return request({
    url: '^/basicinfo/editInfo',
    method: 'post',
    data
  })
}
export function selectWeekInfo () {
  return request({
    url: '^/basicinfo/selectWeekInfo',
    method: 'get'
  })
}
export function getAnalysisInfo (begin, end) {
  return request({
    url: '^/basicinfo/analysisInfo?begin=' + begin + '&end=' + end,
    method: 'get'
  })
}
export function listWeekDates (begin, end) {
  return request({
    url: '^/basicinfo/listWeekDates?begin=' + begin + '&end=' + end,
    method: 'get'
  })
}
export function selectByRange (begin, end) {
  return request({
    url: '^/basicinfo/getByRange?begin=' + begin + '&end=' + end,
    method: 'get'
  })
}
